import request from '@/utils/request'

export function getTasks(data) {
  return request({
    url: '/backup/web/task/get_tasks',
    method: 'post',
    data
  })
}
export function addTask(data) {
  return request({
    url: '/backup/web/task/add_task',
    method: 'post',
    data
  })
}
export function updateTask(data) {
  return request({
    url: '/backup/web/task/update_task',
    method: 'post',
    data
  })
}
export function deleteTask(data) {
  return request({
    url: '/backup/web/task/delete_task',
    method: 'post',
    data
  })
}
export function updateStatus(data) {
  return request({
    url: '/backup/web/task/update_status',
    method: 'post',
    data
  })
}
export function updateCron(params) {
  return request({
    url: '/backup/web/task/update_cron',
    method: 'get',
    params
  })
}
export function getTask(data) {
  return request({
    url: '/backup/web/task/get_task',
    method: 'post',
    data
  })
}
/** 根据条件获取任务配置信息*/
export function getConfigs(data) {
  return request({
    url: '/backup/web/task_config/get_configs',
    method: 'post',
    data
  })
}
